Various softirq cleanups:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 31 Mar 2006 11:03:42 +0000 (12:03 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 31 Mar 2006 11:03:42 +0000 (12:03 +0100)
 1. Make __softirq_pending a long, since PPC borrows the file
    hardirq.h from us and they only do atomic ops on longs.
 2. do_softirq() explicitly takes a void param list.
 3. Remove idle_timestamp field from irq_cpustat. It's unused
    and lets us simplify the idle loop a little bit.

Part 1 based on a patch from Hollis Blanchard at IBM.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/domain.c
xen/common/softirq.c
xen/include/asm-x86/hardirq.h

index 8cb91ead4d6bde013d0396e055258ad7d72da105..ab5b6979539cfc85fbf090359b9df3e034f3b843 100644 (file)
@@ -79,15 +79,12 @@ void idle_loop(void)
 
     for ( ; ; )
     {
-        irq_stat[cpu].idle_timestamp = jiffies;
+        page_scrub_schedule_work();
 
-        while ( !softirq_pending(cpu) )
-        {
-            page_scrub_schedule_work();
-            default_idle();
-        }
+        default_idle();
 
-        do_softirq();
+        if ( softirq_pending(cpu) )
+            do_softirq();
     }
 }
 
index 5a7cd2dabc12ea5cabee7a413994aa5c66b0ad9d..f8a2c3780ca51f142385a01cfd1990af1df1f170 100644 (file)
@@ -21,9 +21,10 @@ irq_cpustat_t irq_stat[NR_CPUS];
 
 static softirq_handler softirq_handlers[NR_SOFTIRQS];
 
-asmlinkage void do_softirq()
+asmlinkage void do_softirq(void)
 {
-    unsigned int i, pending, cpu = smp_processor_id();
+    unsigned int i, cpu = smp_processor_id();
+    unsigned long pending;
 
     pending = softirq_pending(cpu);
     ASSERT(pending != 0);
index 59e90e2b4757f23a4639080aef8ac6ebcd9e9c06..c426fdea07b70fd41c2e59220848b00f8976f90d 100644 (file)
@@ -5,10 +5,9 @@
 #include <xen/cache.h>
 
 typedef struct {
-       unsigned int __softirq_pending;
+       unsigned long __softirq_pending;
        unsigned int __local_irq_count;
        unsigned int __nmi_count;
-       unsigned long idle_timestamp;
 } __cacheline_aligned irq_cpustat_t;
 
 #include <xen/irq_cpustat.h>   /* Standard mappings for irq_cpustat_t above */